﻿@{
    ViewBag.Title = "菜单创建";
    Layout = null;
}
<div id="menu_create_container" class="container">
    <form id="menu_create_from" method="POST">
        <table>
            <tr>
                <th>
                    父类菜单:
                </th>
                <td>
                    <ul id="menu_create_tree_parent"></ul>
                    <input id="menu_create_from_parnet" name="ParentID" />
                </td>
            </tr>
            <tr>
                <th>
                    菜单名称:
                </th>
                <td>
                    <input id="menu_create_from_name" name="Name" />
                </td>
            </tr>
            <tr>
                <th>
                    菜单类型:
                </th>
                <td>
                    <select id="menu_create_from_type" name="Type"></select>
                </td>
            </tr>
            <tr>
                <th>
                    菜单链接:
                </th>
                <td>
                    <input type="text" id="menu_create_from_url" name="Url" />
                </td>
            </tr>
            <tr>
                <th>
                    跳转类型:
                </th>
                <td>
                    <input type="text" id="menu_create_from_target" name="Target" />
                </td>
            </tr>
            <tr>
                <th>
                    是否删除:
                </th>
                <td>
                    <label for="menu_create_from_delflag_yes"><input type="radio" id="menu_create_from_delflag_yes" name="DelFlag" />是</label>
                    <label for="menu_create_from_delflag_no"><input type="radio" id="menu_create_from_delflag_no" name="DelFlag" />否</label>
                </td>
            </tr>
            <tr>
                <th>
                    图标编号
                </th>
                <td>
                    <input type="text" id="menu_create_from_icon" name="IconID" />
                </td>
            </tr>
            <tr>
                <th>
                    是否系统:
                </th>
                <td>
                    <label for="menu_create_from_sys_yes"><input type="radio" id="menu_create_from_sys_yes" name="DelFlag" />是</label>
                    <label for="menu_create_from_sys_no"><input type="radio" id="menu_create_from_sys_no" name="DelFlag" />否</label>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <a href="javascript:;" id="menu_create_from_sys_cancel" style="margin-right: 10px;"></a>
                    <a href="javascript:;" id="menu_create_from_sys_submit">
                    </a>
                </td>
            </tr>
        </table>
    </form>
</div>

<script type="text/javascript">
    Oneworks.CreatePage('UserCreate', {
        settings: {

        },
        commons: {

        },
        controls: {
            container: $('#menu_create_container'),
            form: $('#menu_create_from'),
            submit: $('#menu_create_from_sys_submit'),
            cancel: $('#menu_create_from_sys_cancel')
        },
        events: {
            onSubmit: function () {},
            onCloase: function () {},
            onSuccess: function () {},
            onFailure: function () {}
        }
    }, function () {
        var that = this,
            controls = that.controls,
            setting = that.settings,
            events = that.events;
        controls.init = function () {
            controls.submit.linkbutton({ text: '保存' });
            controls.cancel.linkbutton({ text: '取消' });
            var p = controls.container.parent(),
            h = p.height(),
            w = p.width();
            controls.container.css({
                width: w,
                height: h
            });
        };
        events.init = function () {
            controls.submit.click(function () {
                events.onSubmit();
            });
            controls.cancel.click(function () {
                events.onClose();
            });
        };
        controls.init();
        events.init();
    });
</script>
